<template>
	<view class="xb-page">
		<view class="xb-page-container">
			<view class="page-create-cell">选择以下班级插班,<span @click="createcls" class="page-create" >或者点击新建</span></view>
			<view>

				<view class="">
					<view class="xb-list-cell page-cell-warp" v-for="(item,index) in clsList" :key="index">
						<view>
							<view class="page_cls_name">{{item.name}}</view>
							<view class="page_emp_name"><span class="page-desc-title">班主任</span> {{item.teacher}}</view>
							<view class="page_subject_name">
								<view><span class="page-desc-title">课程名</span> {{item.subject}}</view>
								<view class="page_check">
									<checkbox class="page_check" style="zoom:70%;" @change="check"></checkbox>
								</view>
							</view>
						</view>
						<view>
						</view>
					</view>
				</view>
			</view>
		</view>
	</view>
</template>

<script>
	import pageHead from '../../../components/page-head.vue'
	export default {
		components: {
			pageHead,

		},
		data() {
			return {
				formdata: {
					pageno: 1,
					pagesize: 20,
				},
				clsList: [{
						'name': '刚',
						'teacher': '绿风',
						'subject': '语文'
					},
					{
						'name': '刚',
						'teacher': '绿风',
						'subject': '语文'
					}

				],
			}

		},
		methods: {
			createcls:function(){
				uni.navigateTo({
					url:''
				})
			},
			clsinsert: function(item) {},
			check: function(id, checked) {
				if (checed) {
					var index = checkids.find((v, index, checkids) => {
						return v == id;
					});
					if (index < 0) {
						checkids.push(id);
					}
				} else {
					checkids.splice(checkids.findIndex(item => item === id), 1)
				}
			},
			initData: async function() {
				uni.showNavigationBarLoading();
				const res = await querycls(formdata);
				if (res.success == true) {
					uni.hideNavigationBarLoading();
				} else {
					uni.showNavigationBarLoading();
				}

			},
		},
	}
</script>

<style scoped>
	@import "../../../common/uni.css";
	@import "../../../common/xb.css";

	.page-desc-title {
		color: #929292;
		font-size: 30px;
	}

	.page_cls_name {
		font-size: 40px;

	}

	.page-cell-warp {
		padding-left: 20px;
	}
	.page-create-cell {
		
	}

	.page_check {
		position: absolute;
		bottom: 1%;
		right: 5%;
	}
	.page-create {
		color:#0DC73A ;
	}
</style>
